from django.db import models
import uuid


class BaseModel(models.Model):
    id = models.UUIDField(primary_key=True, max_length=36, default=uuid.uuid4)
    create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间', help_text='创建时间')
    update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间', help_text='更新时间')
    is_delete = models.BooleanField(default=False, verbose_name='逻辑删除', help_text='逻辑删除')

    class Meta:
        # 不会生成表，只做继承使用
        abstract = True
        verbose_name = "公共字段"
